<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>卡斯基车务</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="../../../css/common.css" />
    <link rel="stylesheet" href="../../../css/yewuyuan/wode/yewuyuan_wode_history.css" />
    <script type="text/javascript" src="../../../lib/jquery-3.1.1.min.js"></script>
    <script type="text/javascript" src="../../../lib/underscore.js"></script>
    <script type="text/javascript" src="../../../lib/iscroll.js"></script>
    <script type="text/javascript" src="../../../lib/global.js"></script>
    <script type="text/javascript" src="../../../js/yewuyuan/wode/yewuyuan_wode_history.js"></script>
</head>
<body>

<div class="header">
    <span class="leftBtn backBtn" onclick="window.history.back()">
           &nbsp;
    </span>
    <span class="font20 colorfff top_title bold">历史业务</span>
    <span class="font20 colorfff rightBtn" id="sorting">排序</span>
</div>
<div class="mainContainer">
    <div class="sorting">
        <span class="dot"></span>
        <ul class="sorting_list font12 color796" id="sorting_list">
            <li data-value="1">按业务类型</li>
            <li data-value="2">按剩余时间</li>
            <li data-value="3">按开始时间</li>
        </ul>
    </div>
    <div class="search">
        <div class="search_input radius_small">
            <img src="../../../images/search.png"/>
            <input type="text" placeholder="搜索">
        </div>
    </div>
    <div class="order_list" id="history_list">
        <script type="text/template">
            <div>
                <ul>
                    <%for(var i in data){%>
                    <%var item = data[i];%>
                    <!--该步骤剩余时间大于一小时的样式-->
                    <!--time_limit_most-->
                    <!--该步骤出现问题的样式-->
                    <!--time_limit_over-->
                    <!--该步骤剩余时间小于一小时的样式-->
                    <!--time_limit_hour-->
                    <%if(item.situation == 0){%>
                    <li class="time_limit_finish">
                    <%}else if(item.situation == -1){%>
                    <li class="time_limit_error">
                    <%}else if(item.situation == 1){%>
                    <li class="time_limit_pick">
                    <%}else if(item.situation == 2){%>
                    <li class="time_limit_error">
                    <%}else if(item.situation == 3){%>
                    <li class="time_limit_error">
                    <%}%>
                        <div class="step_name">
                            <span class="font14 color4e4 step"><%=item.stepName%>(<%=item.taskName%>)</span>
                            <%if(item.situation == 0){%>
                            <span class="font12 pick">已完成</span>
                            <%}else if(item.situation == -1){%>
                            <span class="font12 colore22 pick">出现问题</span>
                            <%}else if(item.situation == 1){%>
                            <span class="font12 color17d pick">已重置</span>
                            <%}else if(item.situation == 2){%>
                            <span class="font12 colore22 pick">请求援助</span>
                            <%}else if(item.situation == 3){%>
                            <span class="font12 colore22 pick">超时</span>
                            <%}%>
                        </div>
                        <div class="car_information">
                            <span class="font12 color9a9 car1"><%=item.carPlateNum%></span>
                            <span class="font12 color9a9 car2"><%=item.carColor%></span>
                            <span class="font12 color9a9 car3"><%=item.carBrand%></span>
                            <span class="font12 color796 car4"><%=Math.floor((new Date(item.finishTime.replace(/-/g,'/'))-new Date(item.makeTime.replace(/-/g,'/')))/60000)%>分钟</span>
                            <span class="font12 color796 car5">用时：</span>
                        </div>
                        <div class="car_information_1">
                            <span class="font12 color9a9">发动机号:</span>
                            <span class="font12 color9a9"><%=item.carEngineNum%></span>
                            <span class="font12 color9a9 car6">车架号:</span>
                            <span class="font12 color9a9"><%=item.carChassisNum%></span>
                            <span class="font10 colorfff"></span>
                        </div>
                    </li>
                    <%}%>
                </ul>
            </div>
        </script>
    </div>
</div>
</body>
</html>
